<div class="easyui-tabs" style="width:100%;height: 100%">
    <div title="项目信息">
        <table class="tableForm tableCss">
            <tr>
                <th style="width: 150px;">单位：</th>
                <td>
                    ${(po.dep_name)!}
                </td>
                <th style="width: 150px;">班级：</th>
                <td>
                    ${(po.class_name)!}
                </td>
            </tr>
            <tr>
                <th style="width: 150px;">项目编号：</th>
                <td>
                    ${(po.project_code)!}
                </td>
                <th style="width: 150px;">项目名称：</th>
                <td>
                    ${(po.project_name)!}
                </td>
            </tr>
            <tr>
                <th>项目级别：</th>
                <td>
                    ${(po.project_rank_name)!}
                </td>
                <th>项目类别：</th>
                <td>
                    ${(bp.project_type_name)!}

                </td>
            </tr>
            <tr>
                <th>计划开始时间：</th>
                <td>
                    ${(bp.project_plan_begin_time)!}
                </td>
                <th>计划结束时间：</th>
                <td>
                    ${(bp.project_plan_end_time)!}
                </td>
            </tr>
            <tr>
                <th>考前培训：</th>
                <td>
                    ${(bp.project_is_training_name)!}

                </td>
                <th>是否需要临时考场：</th>
                <td>
                    ${(bp.project_is_temporary_place_name)!}
                </td>
            </tr>
            <tr>
                <th>正考费用：</th>
                <td>
                    ${(po.project_testing_money)!}

                </td>
                <th>单理论：</th>
                <td>
                    ${(po.project_theory_money)!}
                </td>
            </tr>
            <tr>
                <th>单实操：</th>
                <td>
                    ${(po.project_reality_money)!}

                </td>
                <th>其他费用：</th>
                <td>
                    ${(po.project_other_money)!}

                </td>
            </tr>
            <tr>
                <th>报考人数：</th>
                <td>
                    ${(po.project_register_num)!}
                </td>

                <th>正考人数：</th>
                <td>
                    ${(po.project_testing_num)!}

                </td>
            </tr>
            <tr>
                <th>补考理论人数：</th>
                <td>
                    ${(po.project_bk_theory_num)!}
                </td>

                <th>补考实操人数：</th>
                <td>
                    ${(po.project_bk_reality_num)!}

                </td>
            </tr>
            <tr>
                <th>缴费人数：</th>
                <td>
                    ${(po.project_payment_num)!}
                </td>

                <th>缴费总数：</th>
                <td>
                    ${(po.project_payment_money)!}

                </td>
            </tr>
            <tr>
                <th>缴费状态：</th>
                <td>
                    ${(po.project_payment_status_name)!}
                </td>

                <th>报考资料：</th>
                <td>
                    ${(po.project_is_upload_info_name)!}

                </td>
            </tr>
            <tr>
                <th>发证状态：</th>
                <td>
                    ${(po.project_card_status_name)!}
                </td>

                <th>当前环节：</th>
                <td>
                    ${(po.status_name)!}
                </td>
            </tr>
            <tr>
                <th>备注：</th>
                <td colspan="3">
                    ${(po.memo)!}
                </td>
            </tr>
        </table>
    </div>
    <div title="报考说明">
        ${(bp.project_introdution)!}
    </div>
    <div title="项目制定数据包">
        <table id="project_file_list" class="easyui-datagrid" style="width:100%;height:450px"
               rownumbers="true"
               pagination="true"
               pagesize="50"
               singleSelect="true"
               data-options="url:'admin/project_file/listJson?project_id=${(bp.id)!}&dep_id=${(bp.dep_id)!}&status_type=300'">
            <thead>
            <tr>
                <th width="400" field="file_name" align="center">文件名</th>
                <th width="100" field="ff" align="center" data-options="formatter:handle_button">操作</th>
            </tr>
            </thead>
        </table>
    </div>
    <div title="报考学生信息">
        <div id="seach_view_class_detail">
            <div style="padding:5px 5px; border-bottom: dashed #d2d2d2 1px;margin-bottom: 5px;">
                学生名称: <input class="easyui-textbox" style="width:110px" name="student_name" id="student_name">
                身份证号: <input class="easyui-textbox" style="width:110px" name="student_id_cart" id="student_id_cart">
                <a href="javascript://" class="easyui-linkbutton" iconCls="icon-search" onclick="search_but(${(po.project_id)!},${(po.class_id)!})">搜索</a>
            </div>
            <table cellspacing="0" cellpadding="0">
                <tbody>
                <tr>
                    <td>
                        <a href="javascript:void(0)" class="easyui-linkbutton" onclick="add_from_student(${(po.project_id)!},${(po.class_id)!})"
                           data-options="iconCls:'icon-application-add',${((permission_button.p30202!) == 'true')? string('disabled:false','disabled:true')},plain:'true'" id="30202">引入</a>
                    </td>
                    <td>
                        <a href="javascript:void(0)" class="easyui-linkbutton" onclick="parent.addTab(20200,'学生管理','admin/student/index')"
                           data-options="iconCls:'icon-page-excel',${((permission_button.p30203!) == 'true')? string('disabled:false','disabled:true')},plain:'true'" id="30203">导入</a>
                    </td>
                    <td>
                        <a href="javascript:void(0)" class="easyui-linkbutton" onclick="edit_project_student()"
                           data-options="iconCls:'icon-edit',${((permission_button.p30204!) == 'true')? string('disabled:false','disabled:true')},plain:'true'" id="30204">完善学生资料</a>
                    </td>
                    <td>
                        <a target="_blank" href="${root!}admin/project_student/download_project_student?project_id=${(po.project_id)!}&class_id=${(po.class_id)!}" class="easyui-linkbutton"
                           data-options="iconCls:'icon-page-excel',${((permission_button.p30204!) == 'true')? string('disabled:false','disabled:true')},plain:'true'">下载所有报考信息</a>
                    </td>
                    <td>
                        <a target="_blank" href="${root!}admin/project_file/get_bk_model" class="easyui-linkbutton"
                           data-options="iconCls:'icon-page-excel',${((permission_button.p30204!) == 'true')? string('disabled:false','disabled:true')},plain:'true'">报考信息模板</a>
                    </td>
                    <td>
                        <a href="javascript://" class="easyui-linkbutton" onclick="import_file()"
                           data-options="iconCls:'icon-page-excel',${((permission_button.p30204!) == 'true')? string('disabled:false','disabled:true')},plain:'true'">导入报考信息</a>
                    </td>
                    <td>
                        <a href="javascript:void(0)" class="easyui-linkbutton" onclick="check_edit_project_student()"
                           data-options="iconCls:'icon-edit',${((permission_button.p30204!) == 'true')? string('disabled:false','disabled:true')},plain:'true'" id="30294">审核学生更新数据</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <table id="student_list" class="easyui-datagrid" style="width:100%;height:450px"
               rownumbers="true"
               pagination="true"
               pagesize="50"
               singleSelect="true"
               data-options="toolbar:'#seach_view_class_detail',rowStyler:student_update,url:'admin/project_student/listJson?project_id=${(po.project_id)!}&class_id=${(po.class_id)!}'">
            <thead>
            <tr>
                <th width="100" field="student_name"  align="center" sortable="true">学生姓名</th>
                <th width="100" field="student_sb_cart"  align="center" sortable="true">社保卡号</th>
                <th width="140" field="student_sb_ffd"  align="center" sortable="true">社保卡发放地</th>
                <th width="100" field="student_id_cart"  align="center" sortable="true">身份证号</th>
                <th width="120" field="student_sex_name" align="center" sortable="true">性别</th>
                <th width="100" field="student_birthday"  align="center" sortable="true">出生日期</th>
                <th width="120" field="student_hj_address_name"  align="center" sortable="true">户籍所在地</th>
                <th width="120" field="student_hj_address_detail"  align="center" sortable="true">户籍地址</th>
                <th width="100" field="student_hk_type_name"  align="center" sortable="true">户口性质</th>
                <th width="100" field="student_is_marray_name"  align="center" sortable="true">婚姻状态</th>
                <th width="120" field="student_nationality_name"  align="center" sortable="true">民簇</th>
                <th width="120" field="student_political_name"  align="center" sortable="true">政治面貌</th>
                <th width="120" field="at_company"  align="center" sortable="true">所在单位</th>
                <th width="120" field="student_type_name"  align="center" sortable="true">人员类型</th>
                <th width="120" field="app_user_type_name"  align="center" sortable="true">鉴定人员类别</th>
                <th width="120" field="national_rank_name"  align="center" sortable="true">国家职业资格等级</th>
                <th width="120" field="up_national_rank_name"  align="center" sortable="true">上一级职业资格级别</th>
                <th width="120" field="is_not_testing_theory_name"  align="center" sortable="true">是否免考理论</th>
                <th width="120" field="student_cultural_name"  align="center" sortable="true">文化程度</th>
                <th width="120" field="student_high_school_record"  align="center" sortable="true">最高学历专业</th>
                <th width="120" field="student_title"  align="center" sortable="true">职称</th>
                <th width="120" field="student_duty"  align="center" sortable="true">职务</th>
                <th width="120" field="student_age_limit"  align="center" sortable="true">职业年限</th>
                <th width="120" field="student_duty_rank_name"  align="center" sortable="true">专业技术职务级别</th>
                <th width="120" field="student_work_age"  align="center" sortable="true">工龄</th>
                <th width="120" field="student_email"  align="center" sortable="true">电子邮箱</th>
                <th width="120" field="student_address"  align="center" sortable="true">联系地址</th>
                <th width="120" field="student_tel_phone"  align="center" sortable="true">联系电话</th>
                <th width="120" field="student_memo_1"  align="center" sortable="true">基础信息1</th>
                <th width="120" field="student_memo_2"  align="center" sortable="true">基础信息2</th>
                <th width="120" field="project_testing_type_name"  align="center" sortable="true">项目考试类别</th>
                <th width="120" field="project_testing_type_intro"  align="center" sortable="true">项目考试类别说明</th>
                <th width="120" field="project_is_pay_name"  align="center" sortable="true">是否缴费</th>
                <th width="120" field="project_admission_card"  align="center" sortable="true">准考证号</th>
                <th width="120" field="project_testing_address"  align="center" sortable="true">地点</th>
                <th width="120" field="project_testing_room"  align="center" sortable="true">试室</th>
                <th width="120" field="project_testing_seat"  align="center" sortable="true">座位号</th>
                <th width="120" field="project_testing_time"  align="center" sortable="true">时间</th>

                <th width="120" field="project_theory_testing_address"  align="center" sortable="true">理论地点</th>
                <th width="120" field="project_theory_testing_room"  align="center" sortable="true">理论试室</th>
                <th width="120" field="project_theory_testing_seat"  align="center" sortable="true">理论座位号</th>
                <th width="120" field="project_theory_testing_time"  align="center" sortable="true">理论时间</th>
                <th width="120" field="project_reality_testing_address"  align="center" sortable="true">实操地点</th>
                <th width="120" field="project_reality_testing_room"  align="center" sortable="true">实操试室</th>
                <th width="120" field="project_reality_testing_seat"  align="center" sortable="true">实操座位号</th>
                <th width="120" field="project_reality_testing_time"  align="center" sortable="true">实操时间</th>

                <th width="120" field="project_reality_result"  align="center" sortable="true">实操成绩</th>
                <th width="120" field="project_theory_result"  align="center" sortable="true">理论成绩</th>
                <th width="120" field="project_synthesis_result_name"  align="center" sortable="true">综合评定</th>
                <th width="120" field="project_is_card_name"  align="center" sortable="true">是否有证</th>
                <th width="120" field="project_card_code"  align="center" sortable="true">证书编号</th>
                <th width="120" field="project_is_get_card_name"  align="center" sortable="true">取证情况</th>
                <th width="120" field="project_teaching_teacher"  align="center" sortable="true">授课老师</th>
                <th width="120" field="project_examination"  align="center" sortable="true">考评员</th>
                <th width="120" field="project_memo_1"  align="center" sortable="true">备注1</th>
                <th width="120" field="project_memo_2"  align="center" sortable="true">备注2</th>
                <th width="120" field="status_name"  align="center" sortable="true">当前状态</th>

                <th width="140" field="create_time" align="center" sortable="true" data-options="formatter:function(value,row,index){
                         return formatDate(value);
                         } ">创建时间</th>
            </tr>
            </thead>
        </table>
    </div>
    <div title="班级上传学生信息附件">
        <div id="upload_div" style="padding:5px 5px; border-bottom: dashed #d2d2d2 1px;">
            <form method="post" id="upload_file_form" name="upload_file_form" enctype="multipart/form-data" style="  margin-bottom:0;">
                <input type="hidden" id="project_id" name="project_id" value="${(po.project_id)!}"/>
                <input type="hidden" id="dep_id_11111" name="dep_id" value="${(po.dep_id)!}"/>
                <input type="hidden" id="class_id_11111" name="class_id" value="${(po.class_id)!}"/>
                <input type="hidden" id="status_type" name="status_type" value="301"/>
                上传文件：<input class="easyui-filebox" id="file_name_11111" name="file_name" data-options="prompt:'选择文件',buttonText:'选择'"  style="width: 30%;">
                <a href="javascript://" class="easyui-linkbutton" iconCls="icon-page-up" onclick="class_upload_file()">上传</a>
            </form>
        </div>
        <table id="project_student_file_list" class="easyui-datagrid" style="width:100%;height:450px"
               rownumbers="true"
               pagination="true"
               pagesize="50"
               singleSelect="true"
               data-options="url:'admin/project_file/listJson?project_id=${(po.project_id)!}&dep_id=${(po.dep_id)!}&class_id=${(po.class_id)!}&status_type=301',toolbar:'#upload_div'">
            <thead>
            <tr>
                <th width="100" field="class_name" align="center">班级</th>
                <th width="400" field="file_name" align="center">文件名</th>
                <th width="100" field="ff" align="center" data-options="formatter:handle_button_and_delete">操作</th>
            </tr>
            </thead>
        </table>
    </div>
    <div  title="考试数据包" style="width:100%;" >
        <div id="upload_div_302" style="padding:5px 5px; border-bottom: dashed #d2d2d2 1px;">
            <a href="javascript://" class="easyui-linkbutton" iconCls="icon-folder-go" id="30113" onclick="set_project_class_status(${(po.id)!},${(po.status)!})">学校接收任务包</a>
        </div>
        <table id="project_student_file_list_302" class="easyui-datagrid" style="width:100%;height:450px"
               rownumbers="true"
               pagination="true"
               pagesize="50"
               singleSelect="true"
               data-options="toolber:'#upload_div_302',url:'admin/project_file/listJson?project_id=${(po.project_id)!}&dep_id=${(po.dep_id)!}&status_type=302'">
            <thead>
            <tr>
                <th width="400" field="file_name" align="center">文件名</th>
                <th width="100" field="ff" align="center" data-options="formatter:handle_button">操作</th>
            </tr>
            </thead>
        </table>
    </div>
    <div title="区上传领证确认" >
        <table id="project_student_file_list_305" class="easyui-datagrid" style="width:100%;height:480px"
               rownumbers="true"
               pagination="true"
               pagesize="50"
               singleSelect="true"

               data-options="url:'admin/project_file/listJson?project_id=${(po.id)!}&dep_id=${(po.dep_id)!}&status_type=305'">
            <thead>
            <tr>
                <th width="400" field="file_name" align="center">文件名</th>
                <th width="100" field="ff" align="center" data-options="formatter:handle_button">操作</th>
            </tr>
            </thead>
        </table>
    </div>
    <div title="学校上传领证确认" >
        <table id="project_student_file_list_306" class="easyui-datagrid" style="width:100%;height:480px"
               rownumbers="true"
               pagination="true"
               pagesize="50"
               singleSelect="true"
               data-options="url:'admin/project_file/listJson?project_id=${(po.id)!}&dep_id=${(po.dep_id)!}&status_type=306'">
            <thead>
            <tr>
                <th width="100" field="class_name" align="center">班级</th>
                <th width="400" field="file_name" align="center">文件名</th>
                <th width="100" field="ff" align="center" data-options="formatter:handle_button">操作</th>
            </tr>
            </thead>
        </table>
    </div>
    <div title="班级上传领证确认" >
        <div id="upload_div_111" style="padding:5px 5px; border-bottom: dashed #d2d2d2 1px;">
            <form method="post" id="upload_file_form_111" name="upload_file_form" enctype="multipart/form-data" style="  margin-bottom:0;">
                <input type="hidden" id="project_id_111" name="project_id" value="${(po.project_id)!}"/>
                <input type="hidden" id="dep_id_111" name="dep_id" value="${(po.dep_id)!}"/>
                <input type="hidden" id="class_id_111" name="class_id" value="${(po.class_id)!}"/>
                <input type="hidden" id="status_type_111" name="status_type" value="303"/>
                上传文件：<input class="easyui-filebox" id="file_name_111" name="file_name" data-options="prompt:'选择文件',buttonText:'选择'"  style="width: 30%;">
                <a href="javascript://" class="easyui-linkbutton" iconCls="icon-page-up" onclick="send_card_upload_file()">上传</a>
            </form>
        </div>
        <table id="project_student_file_list_303" class="easyui-datagrid" style="width:100%;height:450px"
               rownumbers="true"
               pagination="true"
               pagesize="50"
               singleSelect="true"

               data-options="url:'admin/project_file/listJson?project_id=${(po.project_id)!}&dep_id=${(po.dep_id)!}&class_id=${(po.class_id)!}&status_type=303',tools:'#upload_div_111'">
            <thead>
            <tr>
                <th width="100" field="class_name" align="center">班级</th>
                <th width="400" field="file_name" align="center">文件名</th>
                <th width="100" field="ff" align="center" data-options="formatter:handle_button_and_delete_upload_div_111">操作</th>
            </tr>
            </thead>
        </table>
    </div>
</div>

<script>

    function search_but(project_id,class_id){
        $("#student_list").datagrid("reload",{project_id:project_id,class_id:class_id,student_name:$("#student_name").val(),student_id_cart:$("#student_id_cart").val()});
    }

    function handle_button(value,row,index){
        return "<a targer='_blank' href='admin/project_file/download_file?id="+row.id+"'>下载</a>";
    }

    function handle_button_and_delete(value,row,index){
        return "<a targer='_blank' href='admin/project_file/download_file?id="+row.id+"'>下载</a>"
                +" &nbsp;&nbsp;<a href='javascript://' onclick='del_file("+row.id+",\"project_student_file_list\")'>删除</a>";
    }

    function handle_button_and_delete_upload_div_111(value,row,index){
        return "<a targer='_blank' href='admin/project_file/download_file?id="+row.id+"'>下载</a>"
                +" &nbsp;&nbsp;<a href='javascript://' onclick='del_file("+row.id+",\"project_student_file_list_303\")'>删除</a>";
    }

    var student_update = function(index,row) {
        var st ="${(po.status)!}";
        st=st*1.0;
        if (row.student_update > 0 && (st == 247 || st == 250)) {
            return 'background-color:#6293BB;';
        }
    }

    var import_file = function (){

        $("#import_file").dialog({
            title: "批量完善报考信息",
            iconCls: 'icon-edit',
            width: 400,
            height: 200,
            closed: false,
            cache: false,
            modal: true,
            href: "admin/project/import_testing",
            onLoad: function () {
                $.messager.progress('close');
            },
            buttons: [{
                text: '取消',
                iconCls:'icon-cancel',
                handler: function () {
                    $("#import_file").dialog("close");
                }
            },{
                text: '导入',
                iconCls: 'icon-back',
                handler: function(){
                    $('#import_file_Form').form('submit',{
                        url:"admin/project_student/impdata_update_project_student",
                        dataType:"json",
                        onSubmit:function(){
                            return $(this).form('enableValidation').form('validate');
                        },
                        success:function(data){
                            var data = eval('(' + data + ')');  // change the JSON string to javascript object

                            $.messager.alert("提示",data.msg);
                            if(data.success==1){
                                $("#import_file").dialog("close");
                                $("#student_list").datagrid("reload");
                            }
                        }
                    });

                }

            }]
        });
    }

    function del_file(id,table_id){
        $.messager.confirm("警告","确定要删除吗？",function(b){
            if(b==true){
                $.ajax({
                    type:"post",
                    url:"admin/project_file/delete_file",
                    data:{id:id},
                    dataType:"JSON",
                    success:function(data){
                        $.messager.alert("提示",data.msg);
                        if(data.success==1){
                            $("#"+table_id).datagrid("reload");
                        }
                    }
                })
            }
        });

    }

    $(function(){
        $.ajax({
            url:"admin/index/get_user_permission",
            dataType:"json",
            success:function(data){
                $.each(data.obj,function(i,item){
                    $("#"+item.id).linkbutton("enable");
                });
            }
        });
    });

    function set_project_class_status(project_class_id,status){
        if(status!=258){
            $.messager.show({
                title:'提醒',
                msg:'当前环节不能接收',
                showType:'fade',
                style:{
                    right:'',
                    bottom:''
                }
            });
            return;
        }

        $.ajax({
            url:"admin/project_class/set_project_class_status",
            data:{id:project_class_id,status:259},
            dataType:"json",
            success:function(data){
                $.messager.alert("提示",data.msg);
            }
        });
    }

    function add_from_student(project_id,class_id){
        var st ="${(po.status)!}";
        st=st*1.0;
        if(st >= 249 && st != 250){
            $.messager.show({
                title:'提醒',
                msg:'当前环节不能引入学生',
                showType:'fade',
                style:{
                    right:'',
                    bottom:''
                }
            });
            return;
        }
        $("#editdlg_student").dialog({
            title:"从学生信息表中引入",
            iconCls: 'icon-edit',
            width: 700,
            height: 500,
            closed: false,
            cache: false,
            modal: true,
            href:"admin/student/add_project_student?project_id="+project_id+"&class_id="+class_id,
            onLoad:function() {
                $.messager.progress('close');
            },
            buttons: [{
                text: '取消',
                iconCls:'icon-cancel',
                handler: function () {
                    $("#editdlg_student").dialog("close");
                }
            },{
                text: '引入',
                iconCls: 'icon-ok',
                handler: function () {
                    var classes = $("#add_student_area").datagrid("getSelections");
                    var classes_str = "";
                    $.each(classes,function(i,item){
                        if(i==0){
                            classes_str +=item.id;
                        }else{
                            classes_str +=","+item.id;
                        }
                    });


                    $.ajax({
                        url:"admin/project_student/add_to_student",
                        data:{project_id:project_id,class_id:class_id,students:classes_str},
                        dataType:"json",
                        success:function(data){

                            $.messager.alert("提示",data.msg);
                            if(data.success == 1){
                                $("#editdlg_student").dialog("close");
                                $("#student_list").datagrid("reload");
                            }
                        }
                    });
                }
            }]
        });
    }

    function edit_project_student(){
        var st ="${(po.status)!}";
        st=st*1.0;
        if(st >= 249 && st != 250){
            $.messager.show({
                title:'提醒',
                msg:'当前环节不能编缉学生信息',
                showType:'fade',
                style:{
                    right:'',
                    bottom:''
                }
            });
            return;
        }
        var note =  $("#student_list").datagrid("getSelected");
        if(note == null){
            $.messager.show({
                title:'提醒',
                msg:'请选择要编缉的行',
                showType:'fade',
                style:{
                    right:'',
                    bottom:''
                }
            });
            return;
        }

        $("#editdlg_student").dialog({
            title:"完善学生信息",
            iconCls: 'icon-edit',
            width: 700,
            height: 500,
            closed: false,
            cache: false,
            modal: true,
            href:"admin/project_student/edit_project_student?id="+note.id,
            onLoad:function() {
                $.messager.progress('close');
            },
            buttons: [{
                text: '取消',
                iconCls:'icon-cancel',
                handler: function () {
                    $("#editdlg_student").dialog("close");
                }
            },{
                text: '保存',
                iconCls: 'icon-ok',
                handler: function () {
                    $('#editProjectStudentForm').form('submit',{
                        url:"admin/project_student/save_project_student",
                        onSubmit:function(){
                            return $(this).form('enableValidation').form('validate');
                        },
                        success:function(data){
                            var data = eval('(' + data + ')');  // change the JSON string to javascript object
                            $.messager.alert("提示",data.msg);
                            $("#editdlg_student").dialog("close");
                            $("#student_list").datagrid("reload");
                        }
                    });
                }
            }]
        });
    }

    function check_edit_project_student(){

        var note =  $("#student_list").datagrid("getSelected");
        if(note == null){
            $.messager.show({
                title:'提醒',
                msg:'请选择要编缉的行',
                showType:'fade',
                style:{
                    right:'',
                    bottom:''
                }
            });
            return;
        }
        if(note.student_update == 0){
            $.messager.show({
                title:'提醒',
                msg:'无信息需要审核',
                showType:'fade',
                style:{
                    right:'',
                    bottom:''
                }
            });
            return;
        }

        $("#editdlg_student").dialog({
            title:"审核学生信息",
            iconCls: 'icon-edit',
            width: 800,
            height: 500,
            closed: false,
            cache: false,
            modal: true,
            href:"admin/project_student/check_edit_project_student?id="+note.id,
            onLoad:function() {
                $.messager.progress('close');
            },
            buttons: [{
                text: '关闭',
                iconCls:'icon-cancel',
                handler: function () {
                    $("#editdlg_student").dialog("close");
                }
            },{
                text: '取消应用',
                iconCls:'icon-cancel',
                handler: function () {
                    $.ajax({
                        type:"post",
                        url:"admin/project_student/cancle_check_edit_project_student?id="+note.id,
                        dataType:"JSON",
                        success:function(data){
                            $.messager.alert("提示",data.msg);
                            if(data.state==1){
                                $("#editdlg_student").dialog("close");
                                $("#student_list").datagrid("reload");
                            }
                        }
                    })

                }
            },{
                text: '应用',
                iconCls: 'icon-ok',
                handler: function () {
                    $('#editProjectStudentForm').form('submit',{
                        url:"admin/project_student/save_check_edit_project_student",
                        onSubmit:function(){
                            return $(this).form('enableValidation').form('validate');
                        },
                        success:function(data){
                            var data = eval('(' + data + ')');  // change the JSON string to javascript object
                            $.messager.alert("提示",data.msg);
                            $("#editdlg_student").dialog("close");
                            $("#student_list").datagrid("reload");
                        }
                    });
                }
            }]
        });
    }

    function class_upload_file(){
        var st ="${(po.status)!}";
        if(st!="247" && st !="248" && st !="250"){
            $.messager.show({
                title:'提醒',
                msg:'当前环节不能上传文件',
                showType:'fade',
                style:{
                    right:'',
                    bottom:''
                }
            });
            return;
        }

        var file = $("#file_name_11111").filebox("getValue");
        if(file==""){
            $.messager.show({
                title:'提醒',
                msg:'请选择文件',
                showType:'fade',
                style:{
                    right:'',
                    bottom:''
                }
            });
            return;
        }
        $.messager.progress({
            text:'上传中....',
            interval:100
        });

        $('#upload_file_form').form('submit',{
            url:"admin/project_file/upload_file",
            dataType:"json",
            onSubmit:function(){
                return $(this).form('enableValidation').form('validate');
            },
            success:function(data){
                var data = eval('(' + data + ')');  // change the JSON string to javascript object
                $.messager.alert("提示",data.msg);
                $("#project_student_file_list").datagrid("reload");
                $("#file_name_11111").filebox("setValue",null);
                $.messager.progress('close');

            }
        });
    }

    function send_card_upload_file(){
        var st ="${(po.status)!}";
        if(st!="263" && st !="264"){
            $.messager.show({
                title:'提醒',
                msg:'当前环节不能上传文件',
                showType:'fade',
                style:{
                    right:'',
                    bottom:''
                }
            });
            return;
        }

        var file = $("#file_name_111").filebox("getValue");
        if(file==""){
            $.messager.show({
                title:'提醒',
                msg:'请选择文件',
                showType:'fade',
                style:{
                    right:'',
                    bottom:''
                }
            });
            return;
        }
        $.messager.progress({
            text:'上传中....',
            interval:100
        });

        $('#upload_file_form_111').form('submit',{
            url:"admin/project_file/upload_file",
            dataType:"json",
            onSubmit:function(){
                return $(this).form('enableValidation').form('validate');
            },
            success:function(data){
                $("#project_student_file_list_303").datagrid("reload");
                $("#file_name_111").filebox("setValue","");
                $.messager.progress('close');

            }
        });
    }


</script>